home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-10-11 | 8.6 KB | 619 lines | [TEXT/CWIE] |
- // DDocData.cp -- data container class for Gadgets
-
- #include "DDocData.h"
-
- #include <LFileStream.h>
-
-
- //----------
- DDocData::DDocData ()
- {
- mTriangle = false;
- mLeftRight = false;
- mRadios = 0;
- mBars = 0;
- mStandard2 = 5;
- mGraphic = 5;
- mSlider = 5;
- mTickMarks = 5;
- mNonDirectional = 5;
- mLittleArrows = 5;
- mSpinner = 5;
- mVolumeControl = 3;
- mJimSSlider = 5;
- mStandard3 = 5;
- mIndeterminate = 5;
- mChasingArrows = 5;
- mRectangle = 5;
- mRoundRect = 5;
- mBarberPole = 5;
- mRoundBarber = 5;
- LString::CopyPStr ("\psmall", mSmall);
- LString::CopyPStr ("\plarge", mLarge);
- mX12345 = 0;
- mX12345e6 = 0.0;
- LString::CopyPStr ("\ppassword", mPassword);
- GetLongDateTime (&mDate);
- GetLongDateTime (&mTime);
- LString::CopyPStr ("\pstyled", mStyled);
- }
-
- //----------
- DDocData::~DDocData ()
- {
- }
-
- //----------
- void DDocData::CopyFrom (
- DDocData* inOther)
- {
- mTriangle = inOther->mTriangle;
- mLeftRight = inOther->mLeftRight;
- mRadios = inOther->mRadios;
- mBars = inOther->mBars;
- mStandard2 = inOther->mStandard2;
- mGraphic = inOther->mGraphic;
- mSlider = inOther->mSlider;
- mTickMarks = inOther->mTickMarks;
- mNonDirectional = inOther->mNonDirectional;
- mLittleArrows = inOther->mLittleArrows;
- mSpinner = inOther->mSpinner;
- mVolumeControl = inOther->mVolumeControl;
- mJimSSlider = inOther->mJimSSlider;
- mStandard3 = inOther->mStandard3;
- mIndeterminate = inOther->mIndeterminate;
- mChasingArrows = inOther->mChasingArrows;
- mRectangle = inOther->mRectangle;
- mRoundRect = inOther->mRoundRect;
- mBarberPole = inOther->mBarberPole;
- mRoundBarber = inOther->mRoundBarber;
- LString::CopyPStr (inOther->mSmall, mSmall);
- LString::CopyPStr (inOther->mLarge, mLarge);
- mX12345 = inOther->mX12345;
- mX12345e6 = inOther->mX12345e6;
- LString::CopyPStr (inOther->mPassword, mPassword);
- mDate = inOther->mDate;
- mTime = inOther->mTime;
- LString::CopyPStr (inOther->mStyled, mStyled);
- }
-
- //----------
- void DDocData::ReadFromFile (
- LFileStream* inFile)
- {
- }
-
- //----------
- void DDocData::WriteToFile (
- LFileStream* inFile)
- {
- }
-
-
- //----------
- Boolean DDocData::GetTriangle () const
- {
-
- return mTriangle;
- }
-
- //----------
- void DDocData::SetTriangle (
- Boolean inValue)
- {
- mTriangle = inValue;
-
- SignalDataChanged (idTriangle);
- }
-
-
- //----------
- Boolean DDocData::GetLeftRight () const
- {
-
- return mLeftRight;
- }
-
- //----------
- void DDocData::SetLeftRight (
- Boolean inValue)
- {
- mLeftRight = inValue;
-
- SignalDataChanged (idLeftRight);
- }
-
-
- //----------
- SInt16 DDocData::GetRadios () const
- {
-
- return mRadios;
- }
-
- //----------
- void DDocData::SetRadios (
- SInt16 inValue)
- {
- mRadios = inValue;
-
- SignalDataChanged (idRadios);
- }
-
-
- //----------
- UInt16 DDocData::GetBars () const
- {
-
- return mBars;
- }
-
- //----------
- void DDocData::SetBars (
- UInt16 inValue)
- {
- mBars = inValue;
-
- SignalDataChanged (idBars);
- }
-
-
- //----------
- SInt16 DDocData::GetStandard2 () const
- {
-
- return mStandard2;
- }
-
- //----------
- void DDocData::SetStandard2 (
- SInt16 inValue)
- {
- mStandard2 = inValue;
-
- SignalDataChanged (idStandard2);
- }
-
-
- //----------
- SInt16 DDocData::GetGraphic () const
- {
-
- return mGraphic;
- }
-
- //----------
- void DDocData::SetGraphic (
- SInt16 inValue)
- {
- mGraphic = inValue;
-
- SignalDataChanged (idGraphic);
- }
-
-
- //----------
- SInt16 DDocData::GetSlider () const
- {
-
- return mSlider;
- }
-
- //----------
- void DDocData::SetSlider (
- SInt16 inValue)
- {
- mSlider = inValue;
-
- SignalDataChanged (idSlider);
- }
-
-
- //----------
- SInt16 DDocData::GetTickMarks () const
- {
-
- return mTickMarks;
- }
-
- //----------
- void DDocData::SetTickMarks (
- SInt16 inValue)
- {
- mTickMarks = inValue;
-
- SignalDataChanged (idTickMarks);
- }
-
-
- //----------
- SInt16 DDocData::GetNonDirectional () const
- {
-
- return mNonDirectional;
- }
-
- //----------
- void DDocData::SetNonDirectional (
- SInt16 inValue)
- {
- mNonDirectional = inValue;
-
- SignalDataChanged (idNonDirectional);
- }
-
-
- //----------
- SInt16 DDocData::GetLittleArrows () const
- {
-
- return mLittleArrows;
- }
-
- //----------
- void DDocData::SetLittleArrows (
- SInt16 inValue)
- {
- mLittleArrows = inValue;
-
- SignalDataChanged (idLittleArrows);
- }
-
-
- //----------
- SInt16 DDocData::GetSpinner () const
- {
-
- return mSpinner;
- }
-
- //----------
- void DDocData::SetSpinner (
- SInt16 inValue)
- {
- mSpinner = inValue;
-
- SignalDataChanged (idSpinner);
- }
-
-
- //----------
- SInt16 DDocData::GetVolumeControl () const
- {
-
- return mVolumeControl;
- }
-
- //----------
- void DDocData::SetVolumeControl (
- SInt16 inValue)
- {
- mVolumeControl = inValue;
-
- SignalDataChanged (idVolumeControl);
- }
-
-
- //----------
- SInt16 DDocData::GetJimSSlider () const
- {
-
- return mJimSSlider;
- }
-
- //----------
- void DDocData::SetJimSSlider (
- SInt16 inValue)
- {
- mJimSSlider = inValue;
-
- SignalDataChanged (idJimSSlider);
- }
-
-
- //----------
- SInt16 DDocData::GetStandard3 () const
- {
-
- return mStandard3;
- }
-
- //----------
- void DDocData::SetStandard3 (
- SInt16 inValue)
- {
- mStandard3 = inValue;
-
- SignalDataChanged (idStandard3);
- }
-
-
- //----------
- SInt16 DDocData::GetIndeterminate () const
- {
-
- return mIndeterminate;
- }
-
- //----------
- void DDocData::SetIndeterminate (
- SInt16 inValue)
- {
- mIndeterminate = inValue;
-
- SignalDataChanged (idIndeterminate);
- }
-
-
- //----------
- SInt16 DDocData::GetChasingArrows () const
- {
-
- return mChasingArrows;
- }
-
- //----------
- void DDocData::SetChasingArrows (
- SInt16 inValue)
- {
- mChasingArrows = inValue;
-
- SignalDataChanged (idChasingArrows);
- }
-
-
- //----------
- SInt16 DDocData::GetRectangle () const
- {
-
- return mRectangle;
- }
-
- //----------
- void DDocData::SetRectangle (
- SInt16 inValue)
- {
- mRectangle = inValue;
-
- SignalDataChanged (idRectangle);
- }
-
-
- //----------
- SInt16 DDocData::GetRoundRect () const
- {
-
- return mRoundRect;
- }
-
- //----------
- void DDocData::SetRoundRect (
- SInt16 inValue)
- {
- mRoundRect = inValue;
-
- SignalDataChanged (idRoundRect);
- }
-
-
- //----------
- SInt16 DDocData::GetBarberPole () const
- {
-
- return mBarberPole;
- }
-
- //----------
- void DDocData::SetBarberPole (
- SInt16 inValue)
- {
- mBarberPole = inValue;
-
- SignalDataChanged (idBarberPole);
- }
-
-
- //----------
- SInt16 DDocData::GetRoundBarber () const
- {
-
- return mRoundBarber;
- }
-
- //----------
- void DDocData::SetRoundBarber (
- SInt16 inValue)
- {
- mRoundBarber = inValue;
-
- SignalDataChanged (idRoundBarber);
- }
-
-
- //----------
- StringPtr DDocData::GetSmall (
- Str255 outPtr) const
- {
-
- if (outPtr != nil) {
- LString::CopyPStr (mSmall, outPtr);
- }
- return (StringPtr)mSmall;
- }
-
- //----------
- void DDocData::SetSmall (
- ConstStringPtr inValue)
- {
- LString::CopyPStr (inValue, mSmall);
-
- SignalDataChanged (idSmall);
- }
-
- //----------
- void DDocData::SetSmall (
- CharsHandle inValue)
- {
- SetPStr (mSmall, sizeof (mSmall), inValue);
-
- SignalDataChanged (idSmall);
- }
-
-
- //----------
- StringPtr DDocData::GetLarge (
- Str255 outPtr) const
- {
-
- if (outPtr != nil) {
- LString::CopyPStr (mLarge, outPtr);
- }
- return (StringPtr)mLarge;
- }
-
- //----------
- void DDocData::SetLarge (
- ConstStringPtr inValue)
- {
- LString::CopyPStr (inValue, mLarge);
-
- SignalDataChanged (idLarge);
- }
-
- //----------
- void DDocData::SetLarge (
- CharsHandle inValue)
- {
- SetPStr (mLarge, sizeof (mLarge), inValue);
-
- SignalDataChanged (idLarge);
- }
-
-
- //----------
- SInt32 DDocData::GetX12345 () const
- {
-
- return mX12345;
- }
-
- //----------
- void DDocData::SetX12345 (
- SInt32 inValue)
- {
- mX12345 = inValue;
-
- SignalDataChanged (idX12345);
- }
-
-
- //----------
- double DDocData::GetX12345e6 () const
- {
-
- return mX12345e6;
- }
-
- //----------
- void DDocData::SetX12345e6 (
- double inValue)
- {
- mX12345e6 = inValue;
-
- SignalDataChanged (idX12345e6);
- }
-
-
- //----------
- StringPtr DDocData::GetPassword (
- Str255 outPtr) const
- {
-
- if (outPtr != nil) {
- LString::CopyPStr (mPassword, outPtr);
- }
- return (StringPtr)mPassword;
- }
-
- //----------
- void DDocData::SetPassword (
- ConstStringPtr inValue)
- {
- LString::CopyPStr (inValue, mPassword);
-
- SignalDataChanged (idPassword);
- }
-
- //----------
- void DDocData::SetPassword (
- CharsHandle inValue)
- {
- SetPStr (mPassword, sizeof (mPassword), inValue);
-
- SignalDataChanged (idPassword);
- }
-
-
- //----------
- LongDateRec DDocData::GetDate () const
- {
-
- return mDate;
- }
-
- //----------
- void DDocData::SetDate (
- LongDateRec inValue)
- {
- mDate = inValue;
-
- SignalDataChanged (idDate);
- }
-
-
- //----------
- LongDateRec DDocData::GetTime () const
- {
-
- return mTime;
- }
-
- //----------
- void DDocData::SetTime (
- LongDateRec inValue)
- {
- mTime = inValue;
-
- SignalDataChanged (idTime);
- }
-
-
- //----------
- StringPtr DDocData::GetStyled (
- Str255 outPtr) const
- {
-
- if (outPtr != nil) {
- LString::CopyPStr (mStyled, outPtr);
- }
- return (StringPtr)mStyled;
- }
-
- //----------
- void DDocData::SetStyled (
- ConstStringPtr inValue)
- {
- LString::CopyPStr (inValue, mStyled);
-
- SignalDataChanged (idStyled);
- }
-
- //----------
- void DDocData::SetStyled (
- CharsHandle inValue)
- {
- SetPStr (mStyled, sizeof (mStyled), inValue);
-
- SignalDataChanged (idStyled);
- }
-